.class public Lcom/xingbook/baike/d/a;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# static fields
.field private static a:Lcom/xingbook/baike/d/a;


# instance fields
.field private b:Z

.field private c:Z

.field private d:Z

.field private e:Lcom/xingbook/ui/XbLayout;

.field private f:Lcom/xingbook/ui/ad;

.field private g:Lcom/xingbook/ui/ad;

.field private h:Lcom/xingbook/ui/ad;

.field private i:Lcom/xingbook/baike/d/b;

.field private j:Landroid/widget/ImageView;

.field private k:Landroid/view/ViewGroup;

.field private l:Landroid/content/Context;

.field private m:I

.field private n:I

.field private o:I

.field private p:I

.field private q:I

.field private r:F

.field private s:F

.field private t:I

.field private u:I


# direct methods
.method private constructor <init>(Landroid/app/Activity;)V
    .locals 2

    const/4 v0, 0x1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-boolean v0, p0, Lcom/xingbook/baike/d/a;->b:Z

    iput-boolean v0, p0, Lcom/xingbook/baike/d/a;->c:Z

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/baike/d/a;->d:Z

    invoke-static {p1}, Lcom/xingbook/c/n;->f(Landroid/app/Activity;)F

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->r:F

    invoke-static {p1}, Lcom/xingbook/c/n;->b(Landroid/app/Activity;)F

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->s:F

    const/high16 v0, 0x4431

    iget v1, p0, Lcom/xingbook/baike/d/a;->r:F

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->m:I

    const/high16 v0, 0x4190

    iget v1, p0, Lcom/xingbook/baike/d/a;->r:F

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->n:I

    const/high16 v0, 0x42a0

    iget v1, p0, Lcom/xingbook/baike/d/a;->r:F

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->o:I

    const/high16 v0, 0x4366

    iget v1, p0, Lcom/xingbook/baike/d/a;->r:F

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->p:I

    const/high16 v0, 0x4282

    iget v1, p0, Lcom/xingbook/baike/d/a;->r:F

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->q:I

    invoke-static {p1}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->t:I

    invoke-static {p1}, Lcom/xingbook/c/n;->d(Landroid/app/Activity;)I

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/a;->u:I

    return-void
.end method

.method public static a(Landroid/view/ViewGroup;Landroid/app/Activity;)Lcom/xingbook/baike/d/a;
    .locals 1

    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Lcom/xingbook/baike/d/a;->a(Landroid/view/ViewGroup;Landroid/app/Activity;Z)Lcom/xingbook/baike/d/a;

    move-result-object v0

    return-object v0
.end method

.method public static a(Landroid/view/ViewGroup;Landroid/app/Activity;Z)Lcom/xingbook/baike/d/a;
    .locals 1

    sget-object v0, Lcom/xingbook/baike/d/a;->a:Lcom/xingbook/baike/d/a;

    if-nez v0, :cond_0

    new-instance v0, Lcom/xingbook/baike/d/a;

    invoke-direct {v0, p1}, Lcom/xingbook/baike/d/a;-><init>(Landroid/app/Activity;)V

    sput-object v0, Lcom/xingbook/baike/d/a;->a:Lcom/xingbook/baike/d/a;

    :cond_0
    sget-object v0, Lcom/xingbook/baike/d/a;->a:Lcom/xingbook/baike/d/a;

    iput-boolean p2, v0, Lcom/xingbook/baike/d/a;->d:Z

    sget-object v0, Lcom/xingbook/baike/d/a;->a:Lcom/xingbook/baike/d/a;

    invoke-direct {v0, p0, p1}, Lcom/xingbook/baike/d/a;->b(Landroid/view/ViewGroup;Landroid/app/Activity;)V

    sget-object v0, Lcom/xingbook/baike/d/a;->a:Lcom/xingbook/baike/d/a;

    return-object v0
.end method

.method private b(Landroid/view/ViewGroup;Landroid/app/Activity;)V
    .locals 10

    const/high16 v9, 0x435e

    const/high16 v8, 0x4220

    const/high16 v7, 0x4120

    const/4 v6, 0x1

    const/4 v3, 0x0

    if-nez p1, :cond_2

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    :cond_0
    if-nez p2, :cond_1

    const/4 v0, 0x0

    sput-object v0, Lcom/xingbook/baike/d/a;->a:Lcom/xingbook/baike/d/a;

    :cond_1
    :goto_0
    return-void

    :cond_2
    invoke-virtual {p2}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/baike/d/a;->l:Landroid/content/Context;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    if-nez v0, :cond_3

    new-instance v0, Lcom/xingbook/ui/XbLayout;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->l:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/xingbook/ui/XbLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    invoke-virtual {v0, p0}, Lcom/xingbook/ui/XbLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iput-boolean v6, v0, Lcom/xingbook/ui/XbLayout;->c:Z

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    const/high16 v1, -0x8000

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/XbLayout;->setBackgroundColor(I)V

    iget-boolean v0, p0, Lcom/xingbook/baike/d/a;->d:Z

    if-eqz v0, :cond_5

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iget v1, p0, Lcom/xingbook/baike/d/a;->u:I

    iget v2, p0, Lcom/xingbook/baike/d/a;->t:I

    invoke-virtual {v0, v3, v3, v1, v2}, Lcom/xingbook/ui/XbLayout;->layout(IIII)V

    :goto_1
    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    const v1, 0x15f90

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/XbLayout;->setId(I)V

    new-instance v0, Lcom/xingbook/ui/ad;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->l:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/baike/d/a;->f:Lcom/xingbook/ui/ad;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->f:Lcom/xingbook/ui/ad;

    iput-boolean v6, v0, Lcom/xingbook/ui/ad;->y:Z

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->f:Lcom/xingbook/ui/ad;

    const/4 v1, -0x1

    iput v1, v0, Lcom/xingbook/ui/ad;->i:I

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->f:Lcom/xingbook/ui/ad;

    iput v7, v0, Lcom/xingbook/ui/ad;->j:F

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->f:Lcom/xingbook/ui/ad;

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    new-instance v0, Lcom/xingbook/ui/ad;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->l:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    const v1, -0xcccccd

    iput v1, v0, Lcom/xingbook/ui/ad;->b:I

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    iget v1, p0, Lcom/xingbook/baike/d/a;->r:F

    mul-float/2addr v1, v8

    iput v1, v0, Lcom/xingbook/ui/ad;->c:F

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    const/16 v1, 0x11

    iput v1, v0, Lcom/xingbook/ui/ad;->d:I

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    const v1, -0xcccccd

    const/4 v2, 0x2

    move v4, v3

    move v5, v3

    invoke-virtual/range {v0 .. v6}, Lcom/xingbook/ui/ad;->a(IIIIII)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    new-instance v0, Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->l:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/baike/d/a;->j:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->j:Landroid/widget/ImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->j:Landroid/widget/ImageView;

    const v1, -0x333334

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundColor(I)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->j:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    new-instance v0, Lcom/xingbook/baike/d/b;

    invoke-direct {v0, p2}, Lcom/xingbook/baike/d/b;-><init>(Landroid/app/Activity;)V

    iput-object v0, p0, Lcom/xingbook/baike/d/a;->i:Lcom/xingbook/baike/d/b;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->i:Lcom/xingbook/baike/d/b;

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    new-instance v2, Lcom/xingbook/ui/ad;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->l:Landroid/content/Context;

    invoke-direct {v2, v0}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    const v0, -0x151516

    iput v0, v2, Lcom/xingbook/ui/ad;->i:I

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    invoke-virtual {v0, v2}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    new-instance v0, Lcom/xingbook/ui/ad;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->l:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    const v1, 0x15f91

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/ad;->setId(I)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    const v1, -0x33ffec

    iput v1, v0, Lcom/xingbook/ui/ad;->i:I

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    iput v7, v0, Lcom/xingbook/ui/ad;->j:F

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    const/16 v1, 0x11

    iput v1, v0, Lcom/xingbook/ui/ad;->d:I

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    iget v1, p0, Lcom/xingbook/baike/d/a;->r:F

    mul-float/2addr v1, v8

    iput v1, v0, Lcom/xingbook/ui/ad;->c:F

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    const/4 v1, -0x1

    iput v1, v0, Lcom/xingbook/ui/ad;->b:I

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    const v1, -0xff9934

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/ad;->setHilighted(I)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    const/high16 v0, 0x438f

    iget v1, p0, Lcom/xingbook/baike/d/a;->s:F

    mul-float/2addr v0, v1

    float-to-int v4, v0

    iget v0, p0, Lcom/xingbook/baike/d/a;->n:I

    mul-int/lit8 v0, v0, 0x4

    add-int/2addr v0, v4

    iget v1, p0, Lcom/xingbook/baike/d/a;->o:I

    add-int/2addr v0, v1

    iget v1, p0, Lcom/xingbook/baike/d/a;->q:I

    add-int v5, v0, v1

    iget-boolean v0, p0, Lcom/xingbook/baike/d/a;->d:Z

    if-eqz v0, :cond_6

    iget v0, p0, Lcom/xingbook/baike/d/a;->u:I

    iget v1, p0, Lcom/xingbook/baike/d/a;->m:I

    sub-int/2addr v0, v1

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v1

    iget v0, p0, Lcom/xingbook/baike/d/a;->t:I

    sub-int/2addr v0, v5

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    :goto_2
    iget-object v6, p0, Lcom/xingbook/baike/d/a;->f:Lcom/xingbook/ui/ad;

    iget v7, p0, Lcom/xingbook/baike/d/a;->m:I

    add-int/2addr v7, v1

    add-int/2addr v5, v0

    invoke-virtual {v6, v1, v0, v7, v5}, Lcom/xingbook/ui/ad;->layout(IIII)V

    iget-object v5, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    const-string v6, "\u80b2\u513f\u4e13\u5bb6"

    iput-object v6, v5, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    iget-object v5, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    invoke-virtual {v5, v3}, Lcom/xingbook/ui/ad;->setVisibility(I)V

    iget-object v3, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    iget v5, p0, Lcom/xingbook/baike/d/a;->n:I

    add-int/2addr v5, v1

    iget v6, p0, Lcom/xingbook/baike/d/a;->m:I

    add-int/2addr v6, v1

    iget v7, p0, Lcom/xingbook/baike/d/a;->n:I

    sub-int/2addr v6, v7

    iget v7, p0, Lcom/xingbook/baike/d/a;->q:I

    add-int/2addr v7, v0

    invoke-virtual {v3, v5, v0, v6, v7}, Lcom/xingbook/ui/ad;->layout(IIII)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    invoke-virtual {v0}, Lcom/xingbook/ui/ad;->invalidate()V

    iget v0, p0, Lcom/xingbook/baike/d/a;->n:I

    add-int/2addr v0, v7

    iget-object v3, p0, Lcom/xingbook/baike/d/a;->j:Landroid/widget/ImageView;

    iget v5, p0, Lcom/xingbook/baike/d/a;->n:I

    add-int/2addr v5, v1

    iget v6, p0, Lcom/xingbook/baike/d/a;->n:I

    add-int/2addr v6, v1

    int-to-float v6, v6

    iget v7, p0, Lcom/xingbook/baike/d/a;->s:F

    mul-float/2addr v7, v9

    add-float/2addr v6, v7

    float-to-int v6, v6

    add-int v7, v0, v4

    invoke-virtual {v3, v5, v0, v6, v7}, Landroid/widget/ImageView;->layout(IIII)V

    iget-object v3, p0, Lcom/xingbook/baike/d/a;->i:Lcom/xingbook/baike/d/b;

    iget v5, p0, Lcom/xingbook/baike/d/a;->n:I

    mul-int/lit8 v5, v5, 0x2

    add-int/2addr v5, v1

    int-to-float v5, v5

    iget v6, p0, Lcom/xingbook/baike/d/a;->s:F

    mul-float/2addr v6, v9

    add-float/2addr v5, v6

    float-to-int v5, v5

    iget v6, p0, Lcom/xingbook/baike/d/a;->m:I

    add-int/2addr v6, v1

    iget v7, p0, Lcom/xingbook/baike/d/a;->n:I

    sub-int/2addr v6, v7

    add-int/2addr v4, v0

    invoke-virtual {v3, v5, v0, v6, v4}, Lcom/xingbook/baike/d/b;->layout(IIII)V

    iget v0, p0, Lcom/xingbook/baike/d/a;->n:I

    add-int/2addr v0, v4

    iget v3, p0, Lcom/xingbook/baike/d/a;->m:I

    add-int/2addr v3, v1

    iget v4, p0, Lcom/xingbook/baike/d/a;->o:I

    add-int/2addr v4, v0

    iget v5, p0, Lcom/xingbook/baike/d/a;->n:I

    mul-int/lit8 v5, v5, 0x2

    add-int/2addr v4, v5

    invoke-virtual {v2, v1, v0, v3, v4}, Lcom/xingbook/ui/ad;->layout(IIII)V

    iget v1, p0, Lcom/xingbook/baike/d/a;->n:I

    add-int/2addr v1, v0

    iget-boolean v0, p0, Lcom/xingbook/baike/d/a;->d:Z

    if-eqz v0, :cond_7

    iget v0, p0, Lcom/xingbook/baike/d/a;->u:I

    iget v2, p0, Lcom/xingbook/baike/d/a;->p:I

    sub-int/2addr v0, v2

    div-int/lit8 v0, v0, 0x2

    :goto_3
    iget-object v2, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    const-string v3, "\u7ee7\u7eed\u9605\u8bfb"

    iput-object v3, v2, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    iget-object v2, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    iget v3, p0, Lcom/xingbook/baike/d/a;->p:I

    add-int/2addr v3, v0

    iget v4, p0, Lcom/xingbook/baike/d/a;->o:I

    add-int/2addr v4, v1

    invoke-virtual {v2, v0, v1, v3, v4}, Lcom/xingbook/ui/ad;->layout(IIII)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    invoke-virtual {v0}, Lcom/xingbook/ui/ad;->invalidate()V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->g:Lcom/xingbook/ui/ad;

    invoke-virtual {v0, p0}, Lcom/xingbook/ui/ad;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    :cond_3
    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    invoke-virtual {p1, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    :cond_4
    iput-object p1, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    goto/16 :goto_0

    :cond_5
    iget-object v0, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    iget v1, p0, Lcom/xingbook/baike/d/a;->t:I

    iget v2, p0, Lcom/xingbook/baike/d/a;->u:I

    invoke-virtual {v0, v3, v3, v1, v2}, Lcom/xingbook/ui/XbLayout;->layout(IIII)V

    goto/16 :goto_1

    :cond_6
    iget v0, p0, Lcom/xingbook/baike/d/a;->t:I

    iget v1, p0, Lcom/xingbook/baike/d/a;->m:I

    sub-int/2addr v0, v1

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v1

    iget v0, p0, Lcom/xingbook/baike/d/a;->u:I

    sub-int/2addr v0, v5

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    goto/16 :goto_2

    :cond_7
    iget v0, p0, Lcom/xingbook/baike/d/a;->t:I

    iget v2, p0, Lcom/xingbook/baike/d/a;->p:I

    sub-int/2addr v0, v2

    div-int/lit8 v0, v0, 0x2

    goto :goto_3
.end method


# virtual methods
.method public a()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    :cond_0
    return-void
.end method

.method public a(Lcom/xingbook/baike/b/b;)V
    .locals 1

    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lcom/xingbook/baike/d/a;->a(Lcom/xingbook/baike/b/b;Ljava/lang/String;)V

    return-void
.end method

.method public a(Lcom/xingbook/baike/b/b;Ljava/lang/String;)V
    .locals 6

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    if-eqz p2, :cond_2

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    iput-object p2, v0, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->h:Lcom/xingbook/ui/ad;

    invoke-virtual {v0}, Lcom/xingbook/ui/ad;->invalidate()V

    :cond_2
    iget-object v0, p0, Lcom/xingbook/baike/d/a;->j:Landroid/widget/ImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    invoke-virtual {p1}, Lcom/xingbook/baike/b/b;->b()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->j:Landroid/widget/ImageView;

    const/4 v2, -0x1

    const/4 v3, 0x1

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-static/range {v0 .. v5}, Lcom/xingbook/c/k;->a(Ljava/lang/String;Landroid/widget/ImageView;IZZF)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->i:Lcom/xingbook/baike/d/b;

    invoke-virtual {v0, p1}, Lcom/xingbook/baike/d/b;->a(Lcom/xingbook/baike/b/b;)V

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    invoke-virtual {v1}, Lcom/xingbook/ui/XbLayout;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

    goto :goto_0
.end method

.method public a(ILandroid/view/KeyEvent;)Z
    .locals 2

    const/4 v0, 0x4

    if-ne p1, v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/baike/d/a;->k:Landroid/view/ViewGroup;

    iget-object v1, p0, Lcom/xingbook/baike/d/a;->e:Lcom/xingbook/ui/XbLayout;

    invoke-virtual {v1}, Lcom/xingbook/ui/XbLayout;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    iget-boolean v0, p0, Lcom/xingbook/baike/d/a;->c:Z

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/xingbook/baike/d/a;->a()V

    :cond_0
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 2

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    const v1, 0x15f90

    if-ne v0, v1, :cond_0

    iget-boolean v1, p0, Lcom/xingbook/baike/d/a;->b:Z

    if-nez v1, :cond_1

    :cond_0
    const v1, 0x15f91

    if-ne v0, v1, :cond_2

    :cond_1
    invoke-virtual {p0}, Lcom/xingbook/baike/d/a;->a()V

    :cond_2
    return-void
.end method
